import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import Vant from 'vant';
import 'vant/lib/index.css';
import router from './router/index'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import  './utils/rem'
import { createPinia } from 'pinia'
import { storePlugin } from 'pinia-plugin-store';//pinai数据持久化
import NutUI from "@nutui/nutui";
import "@nutui/nutui/dist/style.css";//nutui组件库
import { Lazyload } from 'vant';
import NutBig from "@nutui/nutui-bingo";//nutui高级组件库
import "@nutui/nutui-bingo/dist/style.css";
const app = createApp(App)

const pinia = createPinia()
const plugin = storePlugin({
 // stores 数组配置了要应用特定存储策略的 store 名称和存储类型。
    // 同时还有 'information' 使用 store（虽然这里没有指定它们的存储类型，默认'localStorage'存储）
    stores: ['information'],
    storage: localStorage,
  });
  app.use(NutBig)
app.use(pinia.use(plugin)) // 注册pinia
app.use(router) // 注册路由
app.use(Vant) // 注册vant
app.use(ElementPlus) // 注册element-plus
app.use(NutUI) // 注册nutui

app.mount('#app')
app.use(Lazyload,{
  loading:'https://ts1.cn.mm.bing.net/th/id/R-C.20d0cd9f696181bbead3b250782239fc?rik=SbpnZs1KZbH7WQ&riu=http%3a%2f%2fbpic.588ku.com%2felement_pic%2f01%2f35%2f24%2f87573bd9e884a1d.jpg&ehk=ey6QOxVSaxQ5tEtERPGAG35xLClVHODGpYU3NDIGLjs%3d&risl=&pid=ImgRaw&r=0',
  error:'https://tse3-mm.cn.bing.net/th/id/OIP-C.91j6Vbw6aGfG9bkZNz4_LgAAAA?w=171&h=132&c=7&r=0&o=5&pid=1.7'
});

